package org.hot100_1;

import org.leetcode.TreeNode;

public class
leetcode38 {
    public TreeNode invertTree(TreeNode root) {

        if (root!=null){
            TreeNode temp = root.left;
            root.left=root.right;
            root.right=temp;

            invertTree(root.left);
            invertTree(root.right);
        }


        return root;
    }
}
